<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="java.util.List,java.util.ArrayList"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!doctype html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html" charset= "UTF-8"/>
<link rel="stylesheet" type="text/css" href="index.css">
<title>新闻内容</title>
</head>
<body>

<div id="wrapper">
	<div id="header">
		<div class="header-left">
			<h2>时代!Era</h2>
	</div>

		

	<div class="header-right">
			<script type="text/javascript"> 
				var d = new Date(); 
				var vYear = d.getFullYear(); 
				var vMon = d.getMonth() + 1; 
				var vDay = d.getDate(); 
				document.write(vYear);
				document.write("年");
				document.write(vMon<10 ? "0" + vMon : vMon); 
				document.write("月");
				document.write(vDay<10 ?  "0"+ vDay : vDay );
				document.write("日");
			</script>
	</div>

		
	<c:if test="${usrLogin==null }">
		<div id="header-login" >
				<a href="UserLoginAction.do" >登录</a>
				&nbsp;&nbsp;<a href="UserRegisterAction.do" >注册</a>
		</div>
	</c:if>
	<c:if test="${usrLogin!=null }">
			<div id="header-login" >
			   您好，${usrLogin}&nbsp;&nbsp;<a href="userRemove.do">注销</a>
			</div>
	</c:if>

		
		
	</div>

	<div id="nav">
		<div style="float:left">
		<ul>
			<li><a href="newsAction.do">首页</a></li>
			<li><a href="classAction.do?classId=4">科技</a></li>
			<li><a href="classAction.do?classId=3">军事</a></li>
			<li><a href="classAction.do?classId=2">娱乐</a></li>
			<li><a href="classAction.do?classId=1">体育</a></li>
		</ul>
		</div>
		<div id="search">
			<form method="post" name="form1" action="findListAction.do">
				<input type="text" name="title" />
				<input type="submit" value="搜索"/>
				
			</form>
		</div>
	</div>
	
	
	<div style="overflow:hidden;width:900px;">
	<%
		
	 %>
   		<div style="width:900px;height:20px;border:1px solid gray;">
      			<a href="classAction.do?classId=${cla.classId }"> ${cla.className}</a>
			 <div style= "float:right"><a href="classAction.do?classId${classId }">更多...</a></div><hr>
   		</div><br>
   		
					
   		<div style="width:900px;height:30px;padding-bottom:10px;">
					   	<h2>${newsInfo.title}</h2>
					   	<br>
  		 </div>
		<div style="width:890px;min-height:600px;line-height:30px;margin-top:5px;padding:10px;">
     	
					   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${newsInfo.mainText}
					  
					   	<br>
   		</div>
	</div><br>
	
		 <div style="width:890px;min-height:200px;margin-top:5px">
	 		<c:forEach var="comment" items="${commentList}">
					<div style="height:40px;background-color:#99ffff;padding-left:10px;">
						@
						${comment.comPerson}
						${comment.commTime}<br>
						${comment.content}<br>
					</div>
					<div style="height:10px;"></div>
		 	</c:forEach>
		</div>

	<div style="overflow:hidden;width:900px;background-color:#dddddd;">
		你的评论：
   		<form name="form_1" action="commentAction.do?newsId=${newsInfo.newsId}&comPerson=${usrLogin}" method="post" >
			<textarea rows="5" cols="100"  name="content" ></textarea>
			<input type="submit" value="发布">
		</form>
	</div><br>
	
	<div id="footer">
		版权所有：五组成员<br>
		houstar@163.com
	</div>
 
</div>

</body>

</html>